import load3

fuzhai=[]
shouyi=[]
wenti=[]
zhouzhuan=[]
code=[]

for i in [29,45,27]:
    code.append(load3.getCell(i,0))
    fuzhai.append(float(load3.getCell(i,load3.fuzhai)))
    shouyi.append(float(load3.getCell(i,load3.shouyi)))
    wenti.append(float(load3.getCell(i,load3.wenti)))
    zhouzhuan.append(float(load3.getCell(i,load3.zhouzhuan)))

allJifen=[]
for i in range(len(fuzhai)):
    jifen=0
    if wenti[i]>0.17:
        jifen+=0
    elif wenti[i]>0.12:
        jifen+=1
    elif wenti[i]>0.08:
        jifen+=2
    elif wenti[i]>0.04:
        jifen+=3
    else:
        jifen+=4

    if shouyi[i]>0.83:
        jifen+=3
    elif shouyi[i]>0.55:
        jifen+=2
    elif shouyi[i]>0.27:
        jifen+=1
    elif shouyi[i]>0.11:
        jifen+=0
    else:
        jifen+=-1

    if fuzhai[i]>0.45:
        jifen+=0
    elif fuzhai[i]>0.37:
        jifen+=1
    elif fuzhai[i]>0.24:
        jifen+=2
    elif fuzhai[i]>0.1:
        jifen+=3
    else:
        jifen+=4

    if zhouzhuan[i]>0.21:
        jifen+=3
    elif zhouzhuan[i]>0.11:
        jifen+=2
    elif zhouzhuan[i]>0.07:
        jifen+=1
    elif zhouzhuan[i]>0.03:
        jifen+=0
    else:
        jifen+=-1

    allJifen.append(jifen)

result=[]
for i in allJifen:
    if i>=10:
        ret=1 # A=1
    elif i>=7:
        ret=2 # B=1
    elif i<=3:
        ret=4
    else:
        ret=3 # C=1
    result.append(ret)

for i in range(len(result)):
    print(code[i]+','+str(allJifen[i])+','+str(result[i]))